<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <script src="/node_modules/vue/dist/vue.global.js"></script>
    <script src="/dist/element3-ui.global.js"></script>
    <link href="/lib/theme-chalk/index.css" rel="stylesheet">
    <style ></style>
  </head>

  <body>
    <div id="app"></div>
    <script>
      const { createApp, reactive, computed, watchEffect } = Vue;
      const { ElButton } = Element3;
      console.log("ElButton", Element3);

      const MyComponent = {
        template: `
                <el-button icon="el-icon-search" @click="click">{{ state.message }}</el-button>
            `,
        setup() {
          const state = reactive({
            message: "Hello Vue 3!!",
          });
          watchEffect(() => {
            console.log("state change ", state.message);
          });
          function click() {
            state.message = state.message.split("").reverse().join("");
          }
          return {
            state,
            click,
          };
        },
      };
      createApp(MyComponent)
        .use(Element3)
        // .use(ElButton)
        .mount("#app")
      
    </script>
  </body>
</html>
